#ifndef LINEITEM_H
#define LINEITEM_H

#include "global.h"
#include <QGraphicsItem>
#include <QPainter>

class GraphWidget;
class QPainter;

class LineItem : public QGraphicsItem
{
public:
    LineItem(GraphWidget *graphWidget, QPointF p1, QPointF p2);
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
    QRectF boundingRect() const;

    int type() const {return LINETYPE;}

private:
    QPointF startPoint;
    QPointF endPoint;
    GraphWidget *graph;
};

#endif // LINEITEM_H
